<template>
<h1>单选组件</h1>
  <hr>
  <el-radio-group v-model="edu">
    <el-radio value="初中" label="学历：初中"/>
    <el-radio value="高中" label="学历：高中"/>
    <el-radio value="本科" label="学历：本科"/>

  </el-radio-group>
  <h4>你的学历：{{edu}}</h4>
  <hr>
  <el-radio-group v-model="pri">
    <el-radio v-for="item in arr" :value="item.price" :label="item.title"/>
  </el-radio-group>
  <h4>商品价格是：{{pri}}</h4>
</template>
<script setup>
import {ref} from "vue";

const edu=ref('本科')

const arr=ref([
  {title:'五粮液',price:500},
  {title:'茅台',price:2500},
  {title:'梦之蓝',price:368},
  {title:'汾酒',price:330}
])
const pri=ref(368);

</script>


<style scoped>

</style>